﻿#define PcMode

using System;
using System.Windows.Forms;
using System.Threading;
using Microsoft.CSharp;

#if PcMode
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;

using FCNS.KeepMoney.Configuration;
namespace FCNS.KeepMoney.Util
{
    class PythonUtil
    {
        /// <summary>
        /// 加载 Python 文件,必须位于程序目录中的 Python 目录内且以 Main.py 文件为程序入口点
        /// </summary>
        /// <param name="file"></param>
        public void LoadPython(string file)
        {
            //ScriptRuntime pyRunTime = Python.CreateRuntime();
            //dynamic obj = pyRunTime.UseFile(AppDefines.appPath + "python\\Test.py");

            //var service = obj.MyService();
            //string result = service.GetData("aaa");
            //MessageBox.Show(result);

            ////调用中的函数
            //result = obj.MyFunction("aaa");
            //MessageBox.Show(result);
        }
    }
}
#endif 